home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 22 / AACD 22.iso / AACD / Online / Apache / include / apache / ap_mmn.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-03-06  |  13.0 KB  |  266 lines

  1. /* ====================================================================
  2.  * The Apache Software License, Version 1.1
  3.  *
  4.  * Copyright (c) 2000 The Apache Software Foundation.  All rights
  5.  * reserved.
  6.  *
  7.  * Redistribution and use in source and binary forms, with or without
  8.  * modification, are permitted provided that the following conditions
  9.  * are met:
  10.  *
  11.  * 1. Redistributions of source code must retain the above copyright
  12.  *    notice, this list of conditions and the following disclaimer.
  13.  *
  14.  * 2. Redistributions in binary form must reproduce the above copyright
  15.  *    notice, this list of conditions and the following disclaimer in
  16.  *    the documentation and/or other materials provided with the
  17.  *    distribution.
  18.  *
  19.  * 3. The end-user documentation included with the redistribution,
  20.  *    if any, must include the following acknowledgment:
  21.  *       "This product includes software developed by the
  22.  *        Apache Software Foundation (http://www.apache.org/)."
  23.  *    Alternately, this acknowledgment may appear in the software itself,
  24.  *    if and wherever such third-party acknowledgments normally appear.
  25.  *
  26.  * 4. The names "Apache" and "Apache Software Foundation" must
  27.  *    not be used to endorse or promote products derived from this
  28.  *    software without prior written permission. For written
  29.  *    permission, please contact apache@apache.org.
  30.  *
  31.  * 5. Products derived from this software may not be called "Apache",
  32.  *    nor may "Apache" appear in their name, without prior written
  33.  *    permission of the Apache Software Foundation.
  34.  *
  35.  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  36.  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  37.  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  38.  * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  39.  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  40.  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  41.  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  42.  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  43.  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  44.  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  45.  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  46.  * SUCH DAMAGE.
  47.  * ====================================================================
  48.  *
  49.  * This software consists of voluntary contributions made by many
  50.  * individuals on behalf of the Apache Software Foundation.  For more
  51.  * information on the Apache Software Foundation, please see
  52.  * <http://www.apache.org/>.
  53.  *
  54.  * Portions of this software are based upon public domain software
  55.  * originally written at the National Center for Supercomputing Applications,
  56.  * University of Illinois, Urbana-Champaign.
  57.  */
  58.  
  59. #ifndef APACHE_AP_MMN_H
  60. #define APACHE_AP_MMN_H
  61.  
  62. /*
  63.  * MODULE_MAGIC_NUMBER_MAJOR
  64.  * Major API changes that could cause compatibility problems for older modules
  65.  * such as structure size changes.  No binary compatibility is possible across
  66.  * a change in the major version.
  67.  *
  68.  * MODULE_MAGIC_NUMBER_MINOR
  69.  * Minor API changes that do not cause binary compatibility problems.
  70.  * Should be reset to 0 when upgrading MODULE_MAGIC_NUMBER_MAJOR.
  71.  *
  72.  * See the MODULE_MAGIC_AT_LEAST macro below for an example.
  73.  */
  74.  
  75. /*
  76.  * 19950525        - original value
  77.  * 19960512 (1.1b2)    - updated, 1.1, version.
  78.  * 19960526 (1.1b3)    - get_token(), table_unset(), pstrndup()
  79.  *              functions added
  80.  * 19960725 (1.2-dev)    - HTTP/1.1 compliance
  81.  *              (new version of read_client_block)
  82.  * 19960806 (1.2-dev)    - scan_script_header_err() added
  83.  * 19961007 (1.2-dev)    - replace read_client_block() with get_client_block()
  84.  * 19961125 (1.2b1)    - change setup_client_block() to Roy's version
  85.  * 19961211 (1.2b3)    - rwrite() added
  86.  * 19970103 (1.2b5-dev)    - header parse API
  87.  * 19970427 (1.2b9-dev)    - port references made unsigned
  88.  * 19970526 (1.2)    - correct vhost walk for multiple requests on a single
  89.  *              connect
  90.  * 19970623 (1.3-dev)    - NT changes
  91.  * 19970628 (1.3-dev)    - ap_slack (fd fixes) added
  92.  * 19970717 (1.3-dev)    - child_init API hook added
  93.  * 19970719 (1.3-dev)    - discard_request_body() added (to clear the decks
  94.  *              as needed)
  95.  * 19970728 (1.3a2-dev)    - child_exit API hook added
  96.  * 19970818 (1.3a2-dev)    - post read-request phase added
  97.  * 19970825 (1.3a2-dev)    - r->mtime cell added
  98.  * 19970831 (1.3a2-dev)    - error logging changed to use aplog_error()
  99.  * 19970902 (1.3a2-dev)    - MD5 routines and structures renamed to ap_*
  100.  * 19970912 (1.3b1-dev)    - set_last_modified split into set_last_modified,
  101.  *               set_etag and meets_conditions
  102.  *              register_other_child API
  103.  *              piped_log API
  104.  *              short_score split into parent and child pieces
  105.  *              os_is_absolute_path
  106.  * 19971026 (1.3b3-dev)    - custom config hooks in place
  107.  * 19980126 (1.3b4-dev)    - ap_cpystrn(), table_addn(), table_setn(),
  108.  *              table_mergen()
  109.  * 19980201 (1.3b4-dev)    - construct_url()
  110.  *              prototype server_rec * -> request_rec *
  111.  *              add get_server_name() and get_server_port()
  112.  * 19980207 (1.3b4-dev)    - add dynamic_load_handle to module structure as part
  113.  *              of the STANDARD_MODULE_STUFF header
  114.  * 19980304 (1.3b6-dev)    - abstraction of SERVER_BUILT and SERVER_VERSION
  115.  * 19980305 (1.3b6-dev)    - ap_config.h added for use by external modules
  116.  * 19980312 (1.3b6-dev)    - parse_uri_components() and its ilk
  117.  *              remove r->hostlen, add r->unparsed_uri
  118.  *              set_string_slot_lower()
  119.  *              clarification: non-RAW_ARGS cmd handlers do not
  120.  *              need to pstrdup() their arguments
  121.  *              clarification: request_rec members content_type,
  122.  *              handler, content_encoding, content_language,
  123.  *              content_languages MUST all be lowercase strings,
  124.  *              and MAY NOT be modified in place -- modifications
  125.  *              require pstrdup().
  126.  * 19980317 (1.3b6-dev)    - CORE_EXPORTs for win32 and <Perl>
  127.  *              API export basic_http_header, send_header_field,
  128.  *              set_keepalive, srm_command_loop, check_cmd_context,
  129.  *              tm2sec
  130.  *              spacetoplus(), plustospace(), client_to_stdout()
  131.  *              removed
  132.  * 19980324 (1.3b6-dev)    - API_EXPORT(index_of_response)
  133.  * 19980413 (1.3b6-dev)    - The BIG SYMBOL RENAMING: general ap_ prefix
  134.  *              (see src/include/compat.h for more details)
  135.  *              ap_vformatter() API, see src/include/ap.h
  136.  * 19980507 (1.3b7-dev)    - addition of ap_add_version_component() and
  137.  *              discontinuation of -DSERVER_SUBVERSION support
  138.  * 19980519 (1.3b7-dev)    - add child_info * to spawn function (as passed to
  139.  *              ap_spawn_child_err_buff) and to ap_call_exec to make
  140.  *              children work correctly on Win32.
  141.  * 19980527 (1.3b8-dev)    - renamed some more functions to ap_ prefix which were
  142.  *              missed at the big renaming (they are defines):
  143.  *              is_default_port, default_port and http_method.
  144.  *              A new communication method for modules was added:
  145.  *              they can create customized error messages under the
  146.  *              "error-notes" key in the request_rec->notes table.
  147.  *              This string will be printed in place of the canned
  148.  *              error responses, and will be propagated to
  149.  *              ErrorDocuments or cgi scripts in the
  150.  *              (REDIRECT_)ERROR_NOTES variable.
  151.  * 19980627 (1.3.1-dev)    - More renaming that we forgot/bypassed. In particular:
  152.  *              table_elts --> ap_table_elts
  153.  *              is_table_empty --> ap_is_table_empty
  154.  * 19980708 (1.3.1-dev)    - ap_isalnum(), ap_isalpha(), ... "8-bit safe" ctype
  155.  *              macros and apctype.h added
  156.  * 19980713 (1.3.1-dev)    - renaming of C header files:
  157.  *              1. conf.h      -> ap_config.h
  158.  *              2. conf_auto.h -> ap_config_auto.h - now merged
  159.  *              3. ap_config.h -> ap_config_auto.h - now merged
  160.  *              4. compat.h    -> ap_compat.h
  161.  *              5. apctype.h   -> ap_ctype.h
  162.  * 19980806 (1.3.2-dev) - add ap_log_rerror()
  163.  *                      - add ap_scan_script_header_err_core()
  164.  *                      - add ap_uuencode()
  165.  *                      - add ap_custom_response()
  166.  * 19980811 (1.3.2-dev)    - added limit_req_line, limit_req_fieldsize, and
  167.  *              limit_req_fields to server_rec.
  168.  *              added limit_req_body to core_dir_config and
  169.  *              ap_get_limit_req_body() to get its value.
  170.  * 19980812 (1.3.2-dev)    - split off MODULE_MAGIC_NUMBER
  171.  * 19980812.2           - add ap_overlap_tables()
  172.  * 19980816 (1.3.2-dev)    - change proxy to use tables for headers, change
  173.  *                        struct cache_req to typedef cache_req.
  174.  *                        Delete ap_proxy_get_header(), ap_proxy_add_header(),
  175.  *                        ap_proxy_del_header(). Change interface of 
  176.  *                        ap_proxy_send_fb() and ap_proxy_cache_error(). 
  177.  *                        Add ap_proxy_send_hdr_line() and ap_proxy_bputs2().
  178.  * 19980825 (1.3.2-dev) - renamed is_HTTP_xxx() macros to ap_is_HTTP_xxx()
  179.  * 19980825.1           - mod_proxy only (minor change): modified interface of
  180.  *                        ap_proxy_read_headers() and rdcache() to use a
  181.  *                        request_rec* instead of pool*
  182.  *                        (for implementing better error reporting).
  183.  * 19980906 (1.3.2-dev) - added ap_md5_binary()
  184.  * 19980917 (1.3.2-dev) - bs2000: changed os_set_authfile() to os_set_account()
  185.  * 19981108 (1.3.4-dev) - added ap_method_number_of()
  186.  *                      - changed value of M_INVALID and added WebDAV methods
  187.  * 19981108.1           - ap_exists_config_define() is now public (minor bump)
  188.  * 19981204             - scoreboard changes -- added generation, changed
  189.  *                        exit_generation to running_generation.  Somewhere
  190.  *                        earlier vhostrec was added, but it's only safe to use
  191.  *                        as of this rev.  See scoreboard.h for documentation.
  192.  * 19981211             - DSO changes -- added ap_single_module_configure()
  193.  *                                    -- added ap_single_module_init()
  194.  * 19981229             - mod_negotiation overhaul -- added ap_make_etag()
  195.  *                        and added vlist_validator to request_rec.
  196.  * 19990101             - renamed macro escape_uri() to ap_escape_uri()
  197.  *                      - added MODULE_MAGIC_COOKIE to identify module structs
  198.  * 19990103 (1.3.4-dev) - added ap_array_pstrcat()
  199.  * 19990105 (1.3.4-dev) - added ap_os_is_filename_valid()
  200.  * 19990106 (1.3.4-dev) - Move MODULE_MAGIC_COOKIE to the end of the
  201.  *                        STANDARD_MODULE_STUFF macro so the version
  202.  *                        numbers and file name remain at invariant offsets
  203.  * 19990108 (1.3.4-dev) - status_drops_connection -> ap_status_drops_connection
  204.  *                        scan_script_header -> ap_scan_script_header_err
  205.  *                      - reordered entries in request_rec that were waiting
  206.  *                        for a non-binary-compatible release.
  207.  *          (1.3.5-dev)
  208.  * 19990108.1           - add ap_MD5Encode() for MD5 password handling.
  209.  * 19990108.2           - add ap_validate_password() and change ap_MD5Encode()
  210.  *                        to use a stronger algorithm.
  211.  * 19990108.4           - add ap_size_list_item(), ap_get_list_item(), and
  212.  *                        ap_find_list_item()
  213.  * 19990108.5           - added ap_sub_req_method_uri() and added const to the
  214.  *                        definition of method in request_rec.
  215.  * 19990108.6           - SIGPIPE is now ignored by the core server.
  216.  * 19990108.7           - ap_isxdigit added
  217.  * 19990320             - METHODS and M_INVALID symbol values modified
  218.  * 19990320.1           - add ap_vrprintf()
  219.  * 19990320.2           - add cmd_parms.context, ap_set_config_vectors, 
  220.  *                        export ap_add_file_conf
  221.  * 19990320.3           - add ap_regexec() and ap_regerror()
  222.  * 19990320.4           - add ap_field_noparam()
  223.  * 19990320.5           - add local_ip/host to conn_rec for mass-vhost
  224.  * 19990320.6           - add ap_SHA1Final(), ap_SHA1Init(),
  225.  *                        ap_SHA1Update_binary(), ap_SHA1Update(),
  226.  *                        ap_base64encode(), ap_base64encode_binary(),
  227.  *                        ap_base64encode_len(), ap_base64decode(),
  228.  *                        ap_base64decode_binary(), ap_base64decode_len(),
  229.  *                        ap_pbase64decode(), ap_pbase64encode()
  230.  * 19990320.7           - add ap_strcasestr()
  231.  * 19990320.8           - add request_rec.case_preserved_filename
  232.  * 19990320.9           - renamed alloc.h to ap_alloc.h
  233.  * 19990320.10          - add ap_is_rdirectory() and ap_stripprefix()
  234.  */
  235.  
  236. #define MODULE_MAGIC_COOKIE 0x41503133UL /* "AP13" */
  237.  
  238. #ifndef MODULE_MAGIC_NUMBER_MAJOR
  239. #define MODULE_MAGIC_NUMBER_MAJOR 19990320
  240. #endif
  241. #define MODULE_MAGIC_NUMBER_MINOR 10                    /* 0...n */
  242.  
  243. /* Useful for testing for features. */
  244. #define AP_MODULE_MAGIC_AT_LEAST(major,minor)        \
  245.     ((major) < MODULE_MAGIC_NUMBER_MAJOR         \
  246.     || ((major) == MODULE_MAGIC_NUMBER_MAJOR     \
  247.         && (minor) <= MODULE_MAGIC_NUMBER_MINOR))
  248.  
  249. /*
  250.  * For example, suppose you wish to use the ap_overlap_tables
  251.  * function.  You can do this:
  252.  *
  253.  * #if AP_MODULE_MAGIC_AT_LEAST(19980812,2)
  254.  *    ... use ap_overlap_tables()
  255.  * #else
  256.  *    ... alternative code which doesn't use ap_overlap_tables()
  257.  * #endif
  258.  *
  259.  */
  260.  
  261. /* deprecated. present for backwards compatibility */
  262. #define MODULE_MAGIC_NUMBER MODULE_MAGIC_NUMBER_MAJOR
  263. #define MODULE_MAGIC_AT_LEAST old_broken_macro_we_hope_you_are_not_using
  264.  
  265. #endif /* !APACHE_AP_MMN_H */
  266.